<?php

namespace App\Console\Commands;

use App\Services\IpBlacklistService;
use Illuminate\Console\Command;

class CleanupIpBlacklist extends Command
{
    protected $signature = 'ip:cleanup';
    protected $description = 'Clean up expired IP blacklist entries';

    public function handle(IpBlacklistService $ipBlacklistService)
    {
        $removedCount = $ipBlacklistService->cleanupExpired();
        $this->info("清理了 {$removedCount} 个过期的黑名单条目");
        
        return Command::SUCCESS;
    }
}
